Default route

A default route is the network route used by a router when no other route is known for a given IP packet's destination address. For this reason it is also known as the gateway of last resort. All packets for destinations not established in the routing table are sent via the default route. This route generally leads to another router, which treats the packet the same way: If the route is known, the packet is forwarded to the known route. If not, the packet is forwarded to the default route of that router which generally leads to another router. The process repeats until a packet is delivered to the destination. Each router traversal counts as one hop in the distance calculation for a route.

Once the router with a known route to a host destination is reached, the router determines which route is valid by performing a longest prefix match to obtain the most specific route. The network with the longest subnet mask that matches the destination IP address is the next-hop network.

The default route in Internet Protocol Version 4 (IPv4) is designated as the zero-address 0.0.0.0/0 in CIDR notation,[1] often called the quad-zero route. The subnet mask is given as /0, which effectively specifies no network, and is the shortest match possible. A route lookup that does not match any other route, falls back to this route. Similarly, in IPv6, the default address is given by ::/0.

Network administrators generally point the default route for a given host towards the router that has a connection to a network service provider. Therefore, packets with destinations outside the host's local area network, typically destinations on the Internet or another wide area network, are forwarded to the router with the connection to that provider.

The device to which the default route points is often called the default gateway which often carries out other functions such as packet filtering, firewalling, or proxy server operations.

References

  1. ^ "RFC1519: Classless Inter-Domain Routing (CIDR): an Address Assignment and Aggregation Strategy". IETF (Internet Engineering Task Force). http://tools.ietf.org/html/rfc1519. "Note that the degenerate route 0.0.0.0 mask 0.0.0.0 is used as a default route and MUST be accepted by all implementations."